/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ActivityTabPanel.java
 *
 * Created on Apr 25, 2011, 5:30:19 PM
 */

package GUIFORMS;

/**
 *
 * @author danielsl
 */
public class ActivityTabPanel extends javax.swing.JPanel {

    /** Creates new form ActivityTabPanel */
    public ActivityTabPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        activityListPanel = new javax.swing.JPanel();
        activityHeader = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        activityJList = new javax.swing.JList();
        newActivityButton = new javax.swing.JButton();
        deleteActivityButton = new javax.swing.JButton();
        activityInfoPanel = new javax.swing.JPanel();
        activityGoalsLabel = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        activityGoalsTextArea = new javax.swing.JTextArea();
        activityPlaceLabel = new javax.swing.JLabel();
        saveActivityButton = new javax.swing.JButton();
        activityPlaceTextField = new javax.swing.JTextField();
        startDateLabel = new javax.swing.JLabel();
        startDateTextField = new javax.swing.JTextField();
        strekLabel = new javax.swing.JLabel();
        endDateTextField = new javax.swing.JTextField();
        responsibleLabel = new javax.swing.JLabel();
        statusLabel = new javax.swing.JLabel();
        activityDescLabel = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        activityDescTextArea = new javax.swing.JTextArea();
        actionListCheckBox = new javax.swing.JCheckBox();
        responsibleDropDown = new javax.swing.JComboBox();
        statusDropDown = new javax.swing.JComboBox();
        boundToSessionLabel = new javax.swing.JLabel();
        boundToSessionDropDown = new javax.swing.JComboBox();
        activityNameLabel = new javax.swing.JLabel();
        activityNameTextField = new javax.swing.JTextField();
        jSeparator2 = new javax.swing.JSeparator();
        jSeparator1 = new javax.swing.JSeparator();

        activityHeader.setFont(new java.awt.Font("Lucida Grande", 1, 13));
        activityHeader.setText("Aktiviteter");

        activityJList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane2.setViewportView(activityJList);

        newActivityButton.setText("Ny aktivitet");
        newActivityButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newActivityButtonActionPerformed(evt);
            }
        });

        deleteActivityButton.setText("Slett");

        org.jdesktop.layout.GroupLayout activityListPanelLayout = new org.jdesktop.layout.GroupLayout(activityListPanel);
        activityListPanel.setLayout(activityListPanelLayout);
        activityListPanelLayout.setHorizontalGroup(
            activityListPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, activityListPanelLayout.createSequentialGroup()
                .add(activityListPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, activityListPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(activityListPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.CENTER, activityHeader)
                            .add(org.jdesktop.layout.GroupLayout.CENTER, jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, activityListPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(activityListPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, deleteActivityButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                            .add(newActivityButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))))
                .addContainerGap())
        );
        activityListPanelLayout.setVerticalGroup(
            activityListPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(activityListPanelLayout.createSequentialGroup()
                .add(activityHeader)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(newActivityButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(deleteActivityButton)
                .add(26, 26, 26))
        );

        activityInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Aktivitet X"));

        activityGoalsLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        activityGoalsLabel.setText("Mål:");

        jScrollPane5.setFocusable(false);

        activityGoalsTextArea.setColumns(20);
        activityGoalsTextArea.setLineWrap(true);
        activityGoalsTextArea.setRows(5);
        activityGoalsTextArea.setWrapStyleWord(true);
        activityGoalsTextArea.setFocusable(false);
        jScrollPane5.setViewportView(activityGoalsTextArea);

        activityPlaceLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        activityPlaceLabel.setText("Sted:");

        saveActivityButton.setText("Lagre");

        activityPlaceTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                activityPlaceTextFieldActionPerformed(evt);
            }
        });

        startDateLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        startDateLabel.setText("Dato:");

        startDateTextField.setText("dd-mm-yyyy");
        startDateTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                startDateTextFieldActionPerformed(evt);
            }
        });

        strekLabel.setText("-");

        endDateTextField.setText("dd-mm-yyyy");
        endDateTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                endDateTextFieldActionPerformed(evt);
            }
        });

        responsibleLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        responsibleLabel.setText("Ansvarlig:");

        statusLabel.setFont(new java.awt.Font("Tahoma", 1, 12));
        statusLabel.setText("Status:");

        activityDescLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        activityDescLabel.setText("Beskrivelse:");

        activityDescTextArea.setColumns(20);
        activityDescTextArea.setLineWrap(true);
        activityDescTextArea.setRows(5);
        activityDescTextArea.setWrapStyleWord(true);
        jScrollPane6.setViewportView(activityDescTextArea);

        actionListCheckBox.setText("Føres opp på aksjonsliste");
        actionListCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                actionListCheckBoxActionPerformed(evt);
            }
        });

        responsibleDropDown.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        statusDropDown.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        boundToSessionLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        boundToSessionLabel.setText("Knyttes til sesjon:");

        boundToSessionDropDown.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        activityNameLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        activityNameLabel.setText("Navn på aktivitet:");

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

        org.jdesktop.layout.GroupLayout activityInfoPanelLayout = new org.jdesktop.layout.GroupLayout(activityInfoPanel);
        activityInfoPanel.setLayout(activityInfoPanelLayout);
        activityInfoPanelLayout.setHorizontalGroup(
            activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(activityInfoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(activityNameLabel)
                        .add(statusLabel)
                        .add(responsibleLabel)
                        .add(boundToSessionLabel)
                        .add(saveActivityButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 158, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(boundToSessionDropDown, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(statusDropDown, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(responsibleDropDown, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(activityNameTextField)
                        .add(jScrollPane6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 315, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(activityDescLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(activityGoalsLabel)
                    .add(actionListCheckBox)
                    .add(activityPlaceLabel)
                    .add(activityInfoPanelLayout.createSequentialGroup()
                        .add(startDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 145, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(18, 18, 18)
                        .add(strekLabel)
                        .add(18, 18, 18)
                        .add(endDateTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))
                    .add(startDateLabel)
                    .add(activityPlaceTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE)
                    .add(jScrollPane5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE))
                .addContainerGap())
        );
        activityInfoPanelLayout.setVerticalGroup(
            activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, activityInfoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)
                    .add(activityInfoPanelLayout.createSequentialGroup()
                        .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(activityInfoPanelLayout.createSequentialGroup()
                                .add(activityNameLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(activityNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(6, 6, 6)
                                .add(boundToSessionLabel))
                            .add(activityInfoPanelLayout.createSequentialGroup()
                                .add(startDateLabel)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(startDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(endDateTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(strekLabel))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(activityPlaceLabel)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(boundToSessionDropDown, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(activityPlaceTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(activityInfoPanelLayout.createSequentialGroup()
                                .add(8, 8, 8)
                                .add(statusLabel)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(statusDropDown, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(activityInfoPanelLayout.createSequentialGroup()
                                .add(29, 29, 29)
                                .add(actionListCheckBox)))
                        .add(9, 9, 9)
                        .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(activityInfoPanelLayout.createSequentialGroup()
                                .add(responsibleLabel)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(responsibleDropDown, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(activityDescLabel))
                            .add(activityGoalsLabel))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(activityInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jScrollPane5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                            .add(jScrollPane6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE))))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(saveActivityButton)
                .addContainerGap())
        );

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(activityListPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(38, 38, 38)
                        .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(activityInfoPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap(31, Short.MAX_VALUE)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(activityInfoPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(68, 68, 68))
            .add(layout.createSequentialGroup()
                .add(20, 20, 20)
                .add(activityListPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void newActivityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newActivityButtonActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_newActivityButtonActionPerformed

    private void activityPlaceTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activityPlaceTextFieldActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_activityPlaceTextFieldActionPerformed

    private void startDateTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startDateTextFieldActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_startDateTextFieldActionPerformed

    private void endDateTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_endDateTextFieldActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_endDateTextFieldActionPerformed

    private void actionListCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_actionListCheckBoxActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_actionListCheckBoxActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JCheckBox actionListCheckBox;
    private javax.swing.JLabel activityDescLabel;
    private javax.swing.JTextArea activityDescTextArea;
    private javax.swing.JLabel activityGoalsLabel;
    private javax.swing.JTextArea activityGoalsTextArea;
    private javax.swing.JLabel activityHeader;
    private javax.swing.JPanel activityInfoPanel;
    private javax.swing.JList activityJList;
    private javax.swing.JPanel activityListPanel;
    private javax.swing.JLabel activityNameLabel;
    private javax.swing.JTextField activityNameTextField;
    private javax.swing.JLabel activityPlaceLabel;
    private javax.swing.JTextField activityPlaceTextField;
    private javax.swing.JComboBox boundToSessionDropDown;
    private javax.swing.JLabel boundToSessionLabel;
    private javax.swing.JButton deleteActivityButton;
    private javax.swing.JTextField endDateTextField;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JButton newActivityButton;
    private javax.swing.JComboBox responsibleDropDown;
    private javax.swing.JLabel responsibleLabel;
    private javax.swing.JButton saveActivityButton;
    private javax.swing.JLabel startDateLabel;
    private javax.swing.JTextField startDateTextField;
    private javax.swing.JComboBox statusDropDown;
    private javax.swing.JLabel statusLabel;
    private javax.swing.JLabel strekLabel;
    // End of variables declaration//GEN-END:variables

}
